package com.weu.service.impl;

import com.weu.bean.Blog;
import com.weu.mapper.BlogMapper;
import com.weu.service.BlogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class BlogServiceImpl implements BlogService {

    @Resource
    private BlogMapper blogMapper;

    @Override
    public List<Blog> getBlogs() {
        return blogMapper.getBlogs();
    }

    @Override
    public Blog getBlog(int blogid) {
        return blogMapper.getBlog(blogid);
    }



    @Override
    public int delBlogById(int id) {
        return blogMapper.delBlogById(id);
    }

    @Override
    public int updateBlog(Blog blog) {
        return blogMapper.updateBlog(blog);
    }

    @Override
    public int insertBlog(Blog blog) {
        return blogMapper.insertBlog(blog);
    }

}
